package java_exceptions;

public class Practice5 {
	static int divide(int x, int y) {

		if (y == 0) {
			throw new DivideByZeroArithmeticException();
		} else {
			return x / y;
		}
	}
	public static void main(String[] args) {
		try {
			System.out.println(divide(10, 2));
			System.out.println(divide(10, 0));
		} catch (DivideByZeroArithmeticException e) {
			System.out.println(e.toString());
		}
	}
}
